<template>
  <div class="buy">
    <cu-header />
    <div class="buy-container container">
      <div class="flex flex-align-items-center flex-justify-content-between mb40">
        <div class="tab1-title">Detalhes do pacote</div>
        <div class="tab1-btn">
          <button>A actualização</button>
        </div>
      </div>
      <div class="types-scroll flex flex-align-items-center">
        <div class="left-arrow flex-none">
          <img :src="require('@/assets/images/left.png')" alt="" />
        </div>
        <div class="center-content flex-auto width0">
          <div class="flex">
            <div class="classify-col flex-none" v-for="item in 20" :key="item">
              <div class="classify-item flex flex-column flex-align-items-center justify-content-center">
                <img :src="require('@/assets/images/type.png')" alt="" />
                <span class="classify-item-label mt15">roupas</span>
              </div>
            </div>
          </div>
        </div>
        <div class="right-arrow flex-none">
          <img :src="require('@/assets/images/right.png')" alt="" />
        </div>
      </div>
      <div class="table-content mt20">
        <el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%" @selection-change="handleSelectionChange">
          <el-table-column align="center" type="selection" width="55"> </el-table-column>
          <el-table-column align="center" prop="text1" label="Secção"></el-table-column>
          <el-table-column align="center" prop="text2" label="Nível de membros"> </el-table-column>
          <el-table-column align="center" prop="text3" label="Número preferencial de itens"> </el-table-column>
        </el-table>
      </div>
    </div>
    <div class="fixed-bottom">
      <div class="money-container container">
        <div class="money-info flex flex-align-items-center flex-justify-content-between">
          <div class="total-num">Total：</div>
          <div class="total-money flex flex-align-items-center"><span class="total-label">Preço total：</span><span class="total-money">300 KZ</span></div>
          <div class="pay-btn"><button>Pagamentos</button></div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import CuHeader from '@/components/header';
export default {
  name: 'Buy',
  components: {
    CuHeader,
  },
  data() {
    return {
      tableData: [
        {
          text1: 'Aqui está o nome da seção',
          text2: 'Junior',
          text3: '3/100',
        },
        {
          text1: 'Aqui está o nome da seção',
          text2: 'Junior',
          text3: '3/100',
        },
        {
          text1: 'Aqui está o nome da seção',
          text2: 'Junior',
          text3: '3/100',
        },
        {
          text1: 'Aqui está o nome da seção',
          text2: 'Junior',
          text3: '3/100',
        },
      ],
    };
  },
  methods: {
    handleSelectionChange(val) {
      this.multipleSelection = val;
    },
  },
};
</script>
<style lang="scss" scoped>
.buy-container {
  padding: 50px 50px 100px;
  box-sizing: border-box;
}

.tab1-title {
  position: relative;
  font-size: 24px;
  color: #333;
  font-weight: bold;
}

.tab1-btn button,
.pay-btn button {
  width: 141px;
  height: 40px;
  background: #fb7924;
  border-radius: 4px;
  color: #fff;
  line-height: 38px;
  border: none;
  outline: none;
  cursor: pointer;
  &:hover {
    background: #fdaf66;
  }
  &:active {
    background: #e27e20;
  }
}
.left-arrow {
  margin-right: 30px;
}
.right-arrow {
  margin-left: 30px;
}
.right-arrow img,
.left-arrow img {
  width: 40px;
  height: 40px;
}
.center-content {
  overflow-x: scroll;
}
.classify-col {
  width: 100px;
  .classify-item {
    height: 180px;
    img {
      width: 78px;
      height: 78px;
      border-radius: 100%;
    }
    .classify-item-label {
      color: #595959;
    }
  }
}
.table-content {
  ::v-deep .el-table {
    thead {
      th {
        color: #fff;
        font-size: 18px;
        font-weight: bold;
        text-align: center;
        padding: 0;
        vertical-align: middle;
        height: 56px;
        background: #333;
        box-sizing: border-box;
      }
    }
    tbody {
      tr {
        height: 80px;
        background: #fff;
        box-sizing: border-box;
        td {
          color: #595959;
          font-size: 16px;
          text-align: center;
          padding: 0;
          vertical-align: middle;
        }
      }
    }
  }
}

.fixed-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  z-index: 1000;
}
.money-container {
  padding: 0 50px;
}

.money-info {
  background: #fff;
  height: 80px;
  box-shadow: 0px -2px 6px rgba(0, 0, 0, 0.1);
  padding: 0 32px;
}
.total-num {
  font-size: 24px;
  color: #333;
  font-weight: bold;
}
.total-label {
  color: #999;
  font-size: 16px;
}
.total-money {
  font-size: 28px;
  color: #e94941;
  font-weight: bold;
}
</style>
